pstatboot<-NULL
for(i in 1:100)
{
init<-sample(1:6,1,T,pstat)
ptemp<-count(generateMarkovChain(init,p,607),6)
ptemp<-ptemp/rowSums(ptemp)
pstatboot<-rbind(pstatboot,stationary(ptemp))
}
> colMeans(pstatboot)
[1] 0.01038693 0.14640018 0.16277728 0.31214766 0.24036621
[6] 0.12802174
> pstat
[1] 0.01023140 0.14429537 0.16379530 0.31205496 0.23956096
[6] 0.13006201
> sqrt(apply(pstatboot,2,"var"))
[1] 0.004130981 0.011175922 0.012188453 0.011302857
[5] 0.011774299 0.011556387
> sqrt(pstat*(1-pstat)/607)
[1] 0.004084511 0.014262439 0.015021478 0.018806071
[5] 0.017323908 0.013652904